package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the kq_attendance_month database table.
 * 
 */
@Entity
@Table(name="kq_attendance_month")
@NamedQuery(name="KqAttendanceMonth.findAll", query="SELECT k FROM KqAttendanceMonth k")
public class KqAttendanceMonth implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="AM_ID")
	private int amId;

	@Column(name="AM_CHI")
	private BigDecimal amChi;

	@Column(name="AM_CHU")
	private int amChu;

	@Column(name="AM_GONGJIA")
	private BigDecimal amGongjia;

	@Column(name="AM_JIEJIA")
	private BigDecimal amJiejia;

	@Column(name="AM_KUANG")
	private BigDecimal amKuang;

	@Temporal(TemporalType.DATE)
	@Column(name="AM_MONTH")
	private Date amMonth;

	@Column(name="AM_QING")
	private BigDecimal amQing;

	@Column(name="AM_QUE")
	private BigDecimal amQue;

	@Column(name="AM_SHICHU")
	private BigDecimal amShichu;

	@Column(name="AM_SHICHUH")
	private int amShichuh;

	@Column(name="AM_TUI")
	private BigDecimal amTui;

	@Column(name="AM_XIUJIA")
	private BigDecimal amXiujia;

	@Column(name="AM_YINGCHU")
	private int amYingchu;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="staff_id")
	private Staff staff;

	//bi-directional many-to-one association to SalaryCount
	@OneToMany(mappedBy="kqAttendanceMonth")
	private List<SalaryCount> salaryCounts;

	public KqAttendanceMonth() {
	}

	public int getAmId() {
		return this.amId;
	}

	public void setAmId(int amId) {
		this.amId = amId;
	}

	public BigDecimal getAmChi() {
		return this.amChi;
	}

	public void setAmChi(BigDecimal amChi) {
		this.amChi = amChi;
	}

	public int getAmChu() {
		return this.amChu;
	}

	public void setAmChu(int amChu) {
		this.amChu = amChu;
	}

	public BigDecimal getAmGongjia() {
		return this.amGongjia;
	}

	public void setAmGongjia(BigDecimal amGongjia) {
		this.amGongjia = amGongjia;
	}

	public BigDecimal getAmJiejia() {
		return this.amJiejia;
	}

	public void setAmJiejia(BigDecimal amJiejia) {
		this.amJiejia = amJiejia;
	}

	public BigDecimal getAmKuang() {
		return this.amKuang;
	}

	public void setAmKuang(BigDecimal amKuang) {
		this.amKuang = amKuang;
	}

	public Date getAmMonth() {
		return this.amMonth;
	}

	public void setAmMonth(Date amMonth) {
		this.amMonth = amMonth;
	}

	public BigDecimal getAmQing() {
		return this.amQing;
	}

	public void setAmQing(BigDecimal amQing) {
		this.amQing = amQing;
	}

	public BigDecimal getAmQue() {
		return this.amQue;
	}

	public void setAmQue(BigDecimal amQue) {
		this.amQue = amQue;
	}

	public BigDecimal getAmShichu() {
		return this.amShichu;
	}

	public void setAmShichu(BigDecimal amShichu) {
		this.amShichu = amShichu;
	}

	public int getAmShichuh() {
		return this.amShichuh;
	}

	public void setAmShichuh(int amShichuh) {
		this.amShichuh = amShichuh;
	}

	public BigDecimal getAmTui() {
		return this.amTui;
	}

	public void setAmTui(BigDecimal amTui) {
		this.amTui = amTui;
	}

	public BigDecimal getAmXiujia() {
		return this.amXiujia;
	}

	public void setAmXiujia(BigDecimal amXiujia) {
		this.amXiujia = amXiujia;
	}

	public int getAmYingchu() {
		return this.amYingchu;
	}

	public void setAmYingchu(int amYingchu) {
		this.amYingchu = amYingchu;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public List<SalaryCount> getSalaryCounts() {
		return this.salaryCounts;
	}

	public void setSalaryCounts(List<SalaryCount> salaryCounts) {
		this.salaryCounts = salaryCounts;
	}

	public SalaryCount addSalaryCount(SalaryCount salaryCount) {
		getSalaryCounts().add(salaryCount);
		salaryCount.setKqAttendanceMonth(this);

		return salaryCount;
	}

	public SalaryCount removeSalaryCount(SalaryCount salaryCount) {
		getSalaryCounts().remove(salaryCount);
		salaryCount.setKqAttendanceMonth(null);

		return salaryCount;
	}

}